home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global gVoiceChannel, gSoundFXChannel, gMusicChannel, gPathToSound, fileDelimiter, gNumOfPlayers
- if soundBusy(gVoiceChannel) then
- go(the frame)
- else
- sound stop gSoundFXChannel
- end if
- end
-
- on keyDown
- global gVoiceChannel, gSoundFXChannel, gMusicChannel, gPathToSound, fileDelimiter, gNumOfPlayers
- set jKey to the keyPressed
- if jKey = "a" then
- sound playFile gVoiceChannel, gPathToSound & "qanda" & fileDelimiter & "player1.aif"
- else
- if (jKey = "b") and (gNumOfPlayers > 1) then
- sound playFile gVoiceChannel, gPathToSound & "qanda" & fileDelimiter & "player2.aif"
- else
- if (jKey = "c") and (gNumOfPlayers > 2) then
- sound playFile gVoiceChannel, gPathToSound & "qanda" & fileDelimiter & "player3.aif"
- else
- exit
- end if
- end if
- end if
- sound playFile gSoundFXChannel, gPathToSound & "soundFX" & fileDelimiter & "ticking2.aif"
- set jTime to the timer
- set jGuessed to 0
- repeat while (the timer - jTime) < 300
- set jKey to the keyPressed
- if getPos(["1", "2", "3"], jKey) then
- set jGuessed to 1
- exit repeat
- end if
- end repeat
- end
-